__all__ = ["User"]  # 只是针对from 包.模块 import *

version = "1.1"


class User:
    def __init__(self, username, password):
        self.username = username
        self.password = password

    def login(self, username, password):
        if username == self.username and password == self.password:
            print("登录成功")
        else:
            print("登录失败！")

    def show(self):
        print(self.username, self.password)


# 控制只在本包调用会执行，而导入到其他地方则不执行
if __name__ == "__main__":
    print("-----login-----")  # 不加控制则会在导入预加载出现到其他地方
